Skip to content

WIP: feat(server): separate HTTPS from mTLS authentication#1351

Open
sjenning wants to merge 1 commit into
NVIDIA:mainfrom
sjenning:feat/separate-https-from-mtls
Open

WIP: feat(server): separate HTTPS from mTLS authentication#1351
sjenning wants to merge 1 commit into
NVIDIA:mainfrom
sjenning:feat/separate-https-from-mtls

Conversation

@sjenning
Copy link
Copy Markdown
Contributor

Summary

  • Make --tls-client-ca optional when TLS is enabled, decoupling HTTPS encryption from mTLS client certificate authentication
  • Enable HTTPS + OIDC-only deployments where the gateway serves encrypted traffic without requiring client certificates
  • Add startup warning when neither mTLS nor OIDC is configured (no auth mechanism)

Related Issue

N/A

Changes

  • openshell-core/config.rs: Change TlsConfig.client_ca_path from PathBuf to Option<PathBuf>
  • openshell-server/tls.rs: Branch TlsAcceptor::from_filesSome(ca) builds mTLS verifier, None uses with_no_client_auth()
  • openshell-server/cli.rs: Remove runtime error requiring --tls-client-ca; add HTTPS-only log message and no-auth warning
  • openshell-server/lib.rs: Pass client_ca_path.as_deref() to from_files
  • openshell-server/compute/vm.rs: Wrap test client_ca_path values in Some()
  • Helm statefulset.yaml: Conditionally include client-ca env var, volume mount, and volume
  • Helm values.yaml: Document that clientCaSecretName is optional

Testing

  • mise run pre-commit passes
  • All 7 edge_tunnel_auth integration tests pass (including new https_only_no_client_cert_required)
  • All 4 multiplex_tls_integration tests pass
  • Manual: start gateway with --tls-cert and --tls-key only, verify HTTPS-only mode works with OIDC

Checklist

  • Conventional commit format
  • No secrets committed
  • Backward compatible (existing deployments with --tls-client-ca work identically)
  • Tests added for new behavior

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Make --tls-client-ca optional and make client certificates always
optional when a CA is configured. This decouples HTTPS encryption
from mTLS authentication, allowing mTLS and OIDC bearer tokens to
coexist as parallel authentication mechanisms.

When --tls-client-ca is provided, client certificates are validated
against the CA when presented but never required. Clients may connect
with or without a certificate — authentication is handled at the
application layer (e.g. OIDC).

Two TLS modes are now supported:
- HTTPS with optional mTLS (--tls-client-ca provided)
- HTTPS-only (--tls-client-ca omitted)

The --disable-gateway-auth flag is preserved for backward
compatibility but is now a no-op. The allow_unauthenticated field
has been removed from TlsConfig. The Helm chart conditionally
includes the client-ca volume and env var based on whether
clientCaSecretName is configured.
@sjenning sjenning force-pushed the feat/separate-https-from-mtls branch from 17b1e9c to 6793737 Compare May 13, 2026 19:24
@sjenning sjenning changed the title feat(server): separate HTTPS from mTLS authentication WIP: feat(server): separate HTTPS from mTLS authentication May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant